<?php
namespace app\wypadmin\controller;
use think\Controller;
use think\Session;

/**
 * 通用类
 */
class Base extends Controller
{
	public $webname;
	public $pagecount;
	
	protected function _initialize()
	{
		$conf = \think\Config::get('myconfig');
		$this->webname 		= $conf['webname'];
		$this->pagecount 	= $conf['pagecount'];
		
        if (!Session::get('uid')) {
         	$this->redirect(url('Login/index'));
         	exit;
         	return;
        }
		$uid = Session::get('uid');
		$username = Session::get('username');
		// $username = 'lwb';
		$this->assign('uid',$uid);
		$this->assign('username',$username);
	}


}